﻿{layout:default} {class:Shop.Supplier.Config.Log}
<lbhead>
    <title><%=Tag("操作日志")%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <div class="tools">
    <ul>
    <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_supplier.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a> > <%=Tag("操作日志")%></span></li>
    </ul>
    </div>
</lbpath>
<lbbody>
    <div class="searchbox">
        <select name="type" id="type">
            <option value="">┌ <%=Tag("日志类型")%></option>
            <option value="0" <%if (type == "0"){ %>selected<%} %>><%=Tag("操作日志")%></option>
            <option value="1" <%if (type == "1"){ %>selected<%} %>><%=Tag("登陆日志")%></option>
        </select>
        <input type="text" name="dateFrom" id="dateFrom" size="12" class="input-calendar" value="<%=dateFrom %>" /> - <input type="text" name="dateTo" id="dateTo" size="12" class="input-calendar" value="<%=dateTo %>" />
        <input name="key" type="text" id="key" class="input-query" value="<%=key %>"/><input type="button" id="btnSou" class="btn-query" onclick="search_();" align="absmiddle" />
    </div>
    <table class="datalist">
        <tr class="title">
            <th style="width: 150px">
                <%=Tag("数据表")%>
            </th>
            <th style="width: 200px">
                <%=Tag("内容")%>
            </th>
            <th style="width: 200px">
                <%=Tag("描述")%>
            </th>
            <th>
                <%=Tag("URL")%>
            </th>
            <th style="width: 120px">
                <%=Tag("时间")%>
            </th>
            <th style="width: 60px">
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (Shop.Model.Lebi_Log model in models)
          {%>
        <tr class="list" ondblclick="View(<%=model.id %>);">
            <td>
                <%=model.TableName %>&nbsp;
            </td>
            <td>
                <%=Shop.Tools.Utils.GetUnicodeSubString(model.Content, 26, "...")%>
            </td>
            <td>
                <%=Shop.Tools.Utils.GetUnicodeSubString(model.Description, 26, "...")%>&nbsp;
            </td>
            <td>
                <%=Shop.Tools.Utils.GetUnicodeSubString(model.URL, 40, "...")%>
            </td>
            <td>
                <%=FormatTime(model.Time_Add) %>
            </td>
            <td>
                <a href="javascript:void(0)" onclick="View(<%=model.id %>);"><%=Tag("查看")%></a>     
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function search_() {
            var key = $("#key").val();
            var type = $("#type").val();
            var dateFrom = $("#dateFrom").val();
            var dateTo = $("#dateTo").val();
            window.location = "?key=" + escape(key) + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&type=" + type;
        }
        function View(id) {
            var title_ = "<%=Tag("日志详情")%>";
            var url_ = "log_edit_window.aspx?id=" + id;
            var width_ = 600;
            var height_ = 'auto';
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
    </script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>